package com.lyh.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.lyh.common.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单对象 lyh_order
 *
 * @author ruoyi
 * @date 2023-05-11
 */
@TableName("lyh_order")
@Data
public class Order implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNum;

    /** 商品id */
    @Excel(name = "商品id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long goodsId;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal actualPayment;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private Long goodsNum;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 支付方式 */
    @Excel(name = "支付方式")

    private String paymentMethod;

    @Excel(name = "支付方式")
    @TableField(exist = false)
    private String paymentMethodName;

    /** 物流信息 */
    @Excel(name = "物流信息")
    private String logisticsInfo;

    /** 运单号 */
    @Excel(name = "运单号")
    private String logisticsNum;

    /** 订单创建时间 */
    @Excel(name = "订单创建时间")
    private Date createTime;

    @Excel(name = "订单支付时间")
    private Date payTime;
    //用户id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
    //单价
    private BigDecimal price;

    //物流公司
    private String logisticsCompany;

    private Long receiveAddressId;

    private String specifications;

    @TableField(exist = false)
    private String goodClassName;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

}
